import T from 'ant-design-vue/es/tooltip'

export default {
  props: Object.assign({}, T.props, {
    tableTitle: {
      type: String,
    },
  }),
  watch: {
    tableTitle: {
      immediate: true,
      handler(val) {
        this.tableTitleText = val
      },
    }
  },
  data() {
    return {
      tableTitleText: ""
    }
  },
  created() {
  },
  methods: {
    renderTooltip(h) {
      return h('a-tooltip', {
        attrs: {
          title: this.title,
          placement: this.placement
        }
      }, [this.tableTitleText])
    },
  },
  render(h) {
    return h('div', {
      attrs: {
        id: "tableTitleTooltip"
      },
    }, [this.renderTooltip(h)])
  }
}